import axios from 'axios';
import { API_NEW_VERSION } from '../api';
// 精品线路列表
export const searchExcellentRouteList = params => {
  return axios.get(API_NEW_VERSION + 'excellent_routes', {params: params});
};
// 保存精品线路
export const saveExcellentRoute = (params) => {
  return axios.post(API_NEW_VERSION + 'excellent_route', params);
};
// 根据ID获取精品线路
export const getExcellentRouteById = (id) => {
  return axios.get(API_NEW_VERSION + 'excellent_route/' + id);
};

// 修改精品路线
export const modifyStatus = (id, params) => {
  return axios.post(API_NEW_VERSION + 'excellent_route/' + id, params);
};

// 根据ID删除精品线路
export const deleteInfoById = (id) => {
  return axios.delete(API_NEW_VERSION + 'excellent_route/' + id);
};

/**
 * 保存精品线路服务明细
 * @param params
 * @returns {AxiosPromise}
 */
export const saveExcellentRouteServiceDetail = (params) => {
  return axios.post(API_NEW_VERSION + 'excellent_route_service_details', params);
};

/**
 * 获取精品线路服务明细列表
 * @param params
 * @returns {AxiosPromise}
 */
export const searchExcellentRouteServiceDetail = params => {
  return axios.get(API_NEW_VERSION + 'excellent_route_service_details', {params: params});
};

/**
 * 修改明细状态
 * @param params
 * @returns {AxiosPromise}
 */
export const changeExcellentRouteServiceDetailStatus = params => {
  return axios.post(API_NEW_VERSION + 'excellent_route_service_detail/change', {params: params});
};
